﻿namespace WH.Repositories.CodeFirst.Models
{
    public class TableAttributeDto
    {
        public string Identity { get; set; } = null!;

        public string TableName { get; set; } = null!;

        public string TableCategory { get; set; } = null!;

        public string? LocationIconFrom { get; set; }

        public string? LocationIconTo { get; set; }

        public bool IsEnable { get; set; }

        public List<ColumnAttributeDto> Columns { get; set; } = new List<ColumnAttributeDto>();
    }

    public class ColumnAttributeDto
    {
        public string Field { get; set; } = null!;

        public string Name { get; set; } = null!;

        public string DataType { get; set; } = null!;

        public int? MaxLength { get; set; }

        public string? Description { get; set; }

        public bool IsNullable { get; set; } = true;

        public bool IsKeyValueCode { get; set; } = false;

        //public string? KeyValueCode { get; set; }

        public bool IsIncludeField { get; set; }

        public string? IncludeTable { get; set; }

        public string? IncludeFromField { get; set; }

        public string? ComponentName { get; set; }

        public string? TableComponentName { get; set; }

        public object? ComponentDefalutValue { get; set; }

        public string? ComponentType { get; set; }

        public bool IsShow { get; set; }

        public bool IsBaseAttr { get; set; }

        public bool IsPrimaryKey { get; set; }

        public bool IsEncryptKey { get; set; }

        /// <summary>
        /// 单选多选  middle multiple
        /// </summary>
        public string? ComponentMode { get; set; }

        /// <summary>
        /// 监听参数
        /// </summary>
        public string? WatchParams { get; set; }

        public int? ShowIndex { get; set; }

        public string? VauleFormat { get; set; }

        public List<ColumnAttributeDto>? IncludeFields { get; set; }
    }
}
